<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
	<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
</head>
<body>
	<div id="vue_det" @click="details">
		<h1 v-for="item in arr">{{item.name}}</h1>
		<h2 :name="arr[0].name">{{arr[0].name}}</h2>
		
		
	</div>
	<script type="text/javascript">
		var vm = new Vue({
			el: '#vue_det',
			data: {
				site: "菜鸟教程",
				url: "www.runoob.com",
				alexa: "10000",
				arr:[{
					name:111,
					age:112
				},{
					name:222,
					age:223
				}]
			},
			mounted() {
				this.arr = [{
					name:1111,
					age:112
				},{
					name:2222,
					age:223
				}]
			},
			methods: {
				details: function() {
					this.$set(this.arr, 0, {name:"tim"})
				}
			}
		})
	</script>
</body>
</html>